import Router from '@/router/index.js'
const config = {
    namespaced: true,
    state: {
        Token: "",
        userInfo: ""
    },
    mutations: {
        REMOVETOKEN(state, data){
            state.Token = data
        }
    },
    getters: {

    },
    actions: {
        async exitLogin(context,data){
            context.state.userInfo = data;
            context.state.Token = data;
            Router.push("/login")
        },
        async updateUserInfo(context,n){
            let param = Object.assign( context.state.userInfo, n);
            context.state.userInfo = param
        },
    }
}


export default config